package com.bailian.spring.ioc.assembly_01.config;

import com.bailian.spring.ioc.assembly_01.bean.Bartender;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Profile;

/**
 * @author gaoxu
 * date: Created on 2021/11/2 下午2:14
 */
@Configuration
@Profile("city")
public class BartenderConfiguration {

    @Bean
    public Bartender zhangxaiosan() {
        Bartender bartender = new Bartender();
        bartender.setName("张小三");
        return bartender;
    }

    @Bean
    public Bartender zhangdasan() {
        Bartender bartender = new Bartender();
        bartender.setName("张大三");
        return bartender;
    }
}
